package sd.czw.com.mmgapp.mcallback;

import com.google.gson.Gson;
import com.zhy.http.okhttp.callback.Callback;
import okhttp3.Response;
import sd.czw.com.mmgapp.model.goodsbean.GoodsDetailsModel;

/**
 * Created by czw
 * desc 描述：
 * on 2017/7/10.
 */
public abstract class GoodsDetailsCallback  extends Callback<GoodsDetailsModel> {

    @Override
    public GoodsDetailsModel parseNetworkResponse(Response response, int id) throws Exception {
        String string = response.body().string();
        GoodsDetailsModel homeInfo = new Gson().fromJson(string, GoodsDetailsModel.class);
        return homeInfo;
    }
}
